//
//  TravelListTableViewCell.m
//  VTravel
//
//  Created by lanouhn on 16/8/5.
//  Copyright © 2016年 xiaoYu. All rights reserved.
//

#import "TravelListTableViewCell.h"

@implementation TravelListTableViewCell

- (void)setModel:(TravelListModel *)model{
    [self.travelImageView sd_setImageWithURL:[NSURL URLWithString:model.picture]];
    self.titleLabel.text = [NSString stringWithFormat:@"<%@>", model.product_name];
    self.priceLabel.text = [NSString stringWithFormat:@"¥%@起", model.adult_price];
    if (model.travel_tag.count != 0) {
        for (int i = 0; i < model.travel_tag.count; i++) {
            if (![model.travel_tag[i] isEqualToString:@""]) {
                UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(8 *(i + 1) + 60 * i, 0, 60, 20)];
                textField.text = model.travel_tag[i];
                textField.textColor = [UIColor orangeColor];
                textField.borderStyle = UITextBorderStyleLine;
                textField.textAlignment = NSTextAlignmentCenter;
                textField.layer.borderColor = [UIColor orangeColor].CGColor;
                textField.layer.borderWidth = 2;
                textField.font = [UIFont systemFontOfSize:13];
                [self.detailView addSubview:textField];
            }
        }
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
